//
//  UIView+XQExtension.m
//  KaKaFastCarDriver
//
//  Created by LiXiqing on 16/11/3.
//  Copyright © 2016年 LiXiQing. All rights reserved.
//

#import "UIView+XQExtension.h"

@implementation UIView (XQExtension)

- (void)setWidthh:(CGFloat)widthh
{
    CGRect frame = self.frame;
    frame.size.width = widthh;
    self.frame = frame;
}

- (void)setHeightt:(CGFloat)heightt
{
    CGRect frame = self.frame;
    frame.size.height = heightt;
    self.frame = frame;
}

- (void)setXx:(CGFloat)xx
{
    CGRect frame = self.frame;
    frame.origin.x = xx;
    self.frame = frame;
}

- (void)setYy:(CGFloat)yy
{
    CGRect frame = self.frame;
    frame.origin.y = yy;
    self.frame = frame;
}
- (void)setSize:(CGSize)size
{
    CGRect frame = self.frame;
    frame.size = size;
    self.frame = frame;
}

- (CGSize)size
{
    return self.frame.size;
}

- (CGFloat)widthh
{
    return self.frame.size.width;
}

- (CGFloat)heightt
{
    return self.frame.size.height;
}

- (CGFloat)xx
{
    return self.frame.origin.x;
}

- (CGFloat)yy
{
    return self.frame.origin.y;
}

- (void)setCenterXX:(CGFloat)centerXX
{
    CGPoint center = self.center;
    center.x = centerXX;
    self.center = center;
}

- (void)setCenterYY:(CGFloat)centerYY
{
    CGPoint center = self.center;
    center.y = centerYY;
    self.center = center;
}

- (CGFloat)centerYY
{
    return self.center.y;
}

- (CGFloat)centerXX
{
    return self.center.x;
}

@end
